<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Modeling</title>
{:importCSS("template.css|style.css|person.css|person-publish.css|person-profile.css|font.css")}
{:importJS("jquery.min.js|input.js|signup.js")}
</head>
<body>
<include file="public:header" />
<div class="main center clearfix">
	<div class="leftbox">
    	<include file="userleftinfo" />
        <div class="clear"></div>
        <include file="usermenu" />
	</div>
    
    <div class="rightbox">
    	<form method="post" action="{:U('User/publish_goods')}" enctype="multipart/form-data">
        <div class="clear"></div>
        <div class="box namebox">
    		<div class="inputword">{:L('WORK_NAME')}</div><input type="text" id="name" name="name" value=""/>
    	</div>
        <div class="clear"></div>
        <div class="box typebox">
        	<div class="inputword">{:L('CONTRACTOR_TYPE')}</div>
            <div id="dropDownList1" class="dropDownList dropdown">
  				<select name="cat_id1" class="dropDownListRight">
                    <option>{:L('WORK_PLEASE_SELECT')}</option>
	                <volist name="pcat_list" id="pcat">
	   				<option value="{$pcat.id}">{:L($data['cgtypename'])}</option>
	   				</volist>
  				</select>
        	</div>
                <div id="dropDownList2" class="dropDownList dropdown">
                    <select name="cat_id2" class="dropDownListRight">
                    <option>{:L('WORK_PLEASE_SELECT')}</option>
  				</select>
        	</div>
    	</div>
        <div class="clear"></div>
        <div class="box budbox">
    		<div class="inputword">{:L('CONTRACTOR_BUDGET')}</div><input type="text" id="price" name="price" value=""/>
    	</div>
        <div class="clear"></div>
        <div class="box budbox">
    		<div class="inputword">{:L('CONTRACTOR_BUDGET')}</div><input type="file" id="img" name="img[]" value=""/>
    	</div>
        <div class="clear"></div>
        <div class="box budbox">
    		<div class="inputword">{:L('CONTRACTOR_BUDGET')}</div><input type="file" id="src" name="img[]" value=""/>
    	</div>
        <div class="clear"></div>
        <div class="box">
                <div class="inputword">{:L('WORK_AIM')}</div><textarea id="desc" name="desc"></textarea>
    	</div>
        <div class="clear"></div>
        <a href="javascript:void(0)" onclick="return $('form').submit()"><div class="button pubbutton">{:L('PERSON_PUBLISH')}</div></a>
    </div>
    <input type="hidden" name="_submit" value="1" />
    </form>
    </div>
<include file="public:footer" />
<script>
$(function() {
    $('select[name="cat_id1"]').change(function() {
        var cat_id =  $('select[name="cat_id1"]').val();
        $.get('{:U("User/ajax_goods_sub_cat")}', {cat_id:cat_id},function(data){
            $('#dropDownList2').html(data);
        });
    });
});
</script>
</body>
</html>
